void merge(int* num1, int m, int* num2, int n)
{
    int end = m + n - 1;
    int end1 = m - 1;
    int end2 = n - 1;
    while(end1 >= 0&&end2 >= 0)
    {
        if(num1[end1] > num2[end2])
        {
            num1[end--] = num1[end1--];
        }
        else
        {
            num1[end--] = num2[end2--];
        }
    }

    while(end2 >= 0)
    {
        num1[end--] = num2[end2--];
    }
}